package com.iscreen.core.services.parser;

import javax.ejb.Stateless;

import org.jboss.ejb3.annotation.LocalBinding;

import com.iscreen.utils.exceptions.IScreenException;

/**
 * Session Bean implementation class ParserBean
 */
@Stateless
@LocalBinding(jndiBinding="Parser")
public class ParserBean implements Parser {

    public void parse(ParseMessage parseMessage) throws IScreenException
    {
    	String dataFileName = parseMessage.getDataFileName();
    	BaseParser parser = ParserFactory.createParser(parseMessage.getParserType());
    	if (parser != null)
    	{
    		parser.parse(dataFileName);
    	}
    }
}
